package edu.neu.cs6515.board;

import lombok.EqualsAndHashCode;
import edu.neu.cs6515.xml.IngeniousColor;

/**
 * Represents a single Hexagon that is used on a {@link HexagonBoard}
 */
@EqualsAndHashCode(exclude = { "top", "topLeft", "topRight", "bottom",
        "bottomLeft", "bottomRight" })
public class Hexagon {

    private Hexagon top;
    private Hexagon topLeft;
    private Hexagon topRight;
    private Hexagon bottom;
    private Hexagon bottomLeft;
    private Hexagon bottomRight;

    private IngeniousColor color;

    private final int distance;
    private final int angle;

    /**
     * Represents a hexagon on a board
     * 
     * @param distance
     *            dist to center
     * @param angle
     *            angle (0 at top, increasing clockwise)
     * @param color
     *            one of the {@link IngeniousColor}
     */
    public Hexagon(final int distance, final int angle,
            final IngeniousColor color) {
        this.color = color;
        this.distance = distance;
        this.angle = angle;
    }

    public final void setColor(final IngeniousColor color) {
        this.color = color;
    }

    public int getDistance() {
        return distance;
    }

    public int getAngle() {
        return angle;
    }

    public IngeniousColor getColor() {
        return color;
    }

    public Hexagon getTop() {
        return top;
    }

    public void setTop(final Hexagon top) {
        this.top = top;
    }

    public Hexagon getTopLeft() {
        return topLeft;
    }

    public void setTopLeft(final Hexagon topLeft) {
        this.topLeft = topLeft;
    }

    public Hexagon getTopRight() {
        return topRight;
    }

    public void setTopRight(final Hexagon topRight) {
        this.topRight = topRight;
    }

    public Hexagon getBottom() {
        return bottom;
    }

    public void setBottom(final Hexagon bottom) {
        this.bottom = bottom;
    }

    public Hexagon getBottomLeft() {
        return bottomLeft;
    }

    public void setBottomLeft(final Hexagon bottomLeft) {
        this.bottomLeft = bottomLeft;
    }

    public Hexagon getBottomRight() {
        return bottomRight;
    }

    public void setBottomRight(final Hexagon bottomRight) {
        this.bottomRight = bottomRight;
    }

}
